using System.ComponentModel.DataAnnotations.Schema;
using System.Data.Entity.ModelConfiguration;

namespace ConsoleApplication11.Models.Mapping
{
    public class adverse_drug_reactionMap : EntityTypeConfiguration<adverse_drug_reaction>
    {
        public adverse_drug_reactionMap()
        {
            // Primary Key
            this.HasKey(t => t.adverse_drug_reaction_id);

            // Properties
            this.Property(t => t.patient_id)
                .HasMaxLength(20);

            this.Property(t => t.CCB_lower_limb_edema)
                .HasMaxLength(1);

            this.Property(t => t.CCB_other)
                .HasMaxLength(200);

            this.Property(t => t.ACEI_ARB_hoose)
                .HasMaxLength(1);

            this.Property(t => t.ACEI_ARB__other)
                .HasMaxLength(200);

            this.Property(t => t.b_receptor_antagonist_heart_slow)
                .HasMaxLength(1);

            this.Property(t => t.b_receptor_antagonist_other)
                .HasMaxLength(200);

            this.Property(t => t.a_receptor_antagonist_orthostatic_hypotension)
                .HasMaxLength(1);

            this.Property(t => t.a_receptor_antagonist_other)
                .HasMaxLength(200);

            this.Property(t => t.aspirin_alimentary_tract_hemorrhage)
                .HasMaxLength(1);

            this.Property(t => t.aspirin_other)
                .HasMaxLength(200);

            this.Property(t => t.clopidogrel_haemorrhagia)
                .HasMaxLength(1);

            this.Property(t => t.clopidogrel_other)
                .HasMaxLength(200);

            this.Property(t => t.statin_rhabdomyolysis)
                .HasMaxLength(1);

            this.Property(t => t.statin_elevated_transaminases)
                .HasMaxLength(1);

            this.Property(t => t.statin_other)
                .HasMaxLength(200);

            this.Property(t => t.Amiodarone_pulmonary_fibrosis)
                .HasMaxLength(1);

            this.Property(t => t.Amiodarone_other)
                .HasMaxLength(200);

            // Table & Column Mappings
            this.ToTable("adverse_drug_reaction");
            this.Property(t => t.adverse_drug_reaction_id).HasColumnName("adverse_drug_reaction_id");
            this.Property(t => t.patient_id).HasColumnName("patient_id");
            this.Property(t => t.follow_up_id).HasColumnName("follow_up_id");
            this.Property(t => t.CCB_lower_limb_edema).HasColumnName("CCB_lower_limb_edema");
            this.Property(t => t.CCB_other).HasColumnName("CCB_other");
            this.Property(t => t.ACEI_ARB_hoose).HasColumnName("ACEI_ARB_hoose");
            this.Property(t => t.ACEI_ARB__other).HasColumnName("ACEI_ARB__other");
            this.Property(t => t.b_receptor_antagonist_heart_slow).HasColumnName("b_receptor_antagonist_heart_slow");
            this.Property(t => t.b_receptor_antagonist_other).HasColumnName("b_receptor_antagonist_other");
            this.Property(t => t.a_receptor_antagonist_orthostatic_hypotension).HasColumnName("a_receptor_antagonist_orthostatic_hypotension");
            this.Property(t => t.a_receptor_antagonist_other).HasColumnName("a_receptor_antagonist_other");
            this.Property(t => t.aspirin_alimentary_tract_hemorrhage).HasColumnName("aspirin_alimentary_tract_hemorrhage");
            this.Property(t => t.aspirin_other).HasColumnName("aspirin_other");
            this.Property(t => t.clopidogrel_haemorrhagia).HasColumnName("clopidogrel_haemorrhagia");
            this.Property(t => t.clopidogrel_other).HasColumnName("clopidogrel_other");
            this.Property(t => t.statin_rhabdomyolysis).HasColumnName("statin_rhabdomyolysis");
            this.Property(t => t.statin_elevated_transaminases).HasColumnName("statin_elevated_transaminases");
            this.Property(t => t.statin_other).HasColumnName("statin_other");
            this.Property(t => t.Amiodarone_pulmonary_fibrosis).HasColumnName("Amiodarone_pulmonary_fibrosis");
            this.Property(t => t.Amiodarone_other).HasColumnName("Amiodarone_other");
        }
    }
}
